<?php
/*
*人人连接DZ插件
*@author by atmwjf<atmwjf@gmail.com>
*@blog:  http://t.qq.com/atmwjf
*/

if(!defined('IN_DISCUZ')) {exit('Access Denied');}

$page=$_G['gp_page'];
$page = max(1, intval($page));
$tpp = 30;
$phpself = "admin.php?action=plugins&operation=config&do=14&identifier=renren&pmod=admin";
$start_limit = ($page - 1) * $tpp;
if($_G['gp_del']==1){
	DB::delete('renren_connect',array('dz_uid'=>$_G['gp_uid']));
	loaducenter();
	uc_user_delete($_G['gp_uid']);
	require_once libfile('function/delete');
	$numdeleted = deletemember($_G['gp_uid'], 0);
}else{
	$i=1;
	$query = DB::query("SELECT * FROM ".DB::table(renren_connect)." LIMIT $start_limit,$tpp");
	$count = DB::result(DB::query("SELECT count(*) FROM ".DB::table('renren_connect').""), 0);
	while($data = DB::fetch($query)){
		$list[$i][name]=DB::result_first("SELECT username FROM ".DB::table(common_member)." where uid=$data[dz_uid]");
		$list[$i][rr_uid]=$data[rr_uid];
		$list[$i][dz_uid]=$data[dz_uid];
		$list[$i][tag]=$data[tag];
		$list[$i][times]=$data[bind_time];
		$i++;
		
	}
	
}

$multipage = multi($count, $tpp, $page, $phpself);
include template('renren:list');

?>
